function ZebraTable($element)
{
    this.Table=$element;
}

ZebraTable.prototype=
{
    Color_1:'#ffffff',
    Color_2:'#f6f6f6',
    Color_3:'#ebeff9',
    Temp:'',

    Render:function($type)
    {
        //查找渲染体
        var renderBody=[];
        if($type=='tbody'){
            renderBody=this.Table.getElementsByTagName('tbody')[0].getElementsByTagName('tr');
        }
        else{
            renderBody=this.Table.getElementsByTagName('tr');
        }
        //渲染
        var color='';
        var temp='';
        for(i=0;i<renderBody.length;i++)
        {
            var row=renderBody[i];
            if(color=='')
                color=row.style.backgroundColor=this.Color_1;
            else
            {
                if(color==this.Color_1)
                    color=row.style.backgroundColor=this.Color_2;
                else
                    color=row.style.backgroundColor=this.Color_1;
            }

            row.onmouseover=(function($row,$color)
            {
                return function()
                {
                    temp=$row.style.backgroundColor;
                    $row.style.backgroundColor=$color;
                };
            })(row,this.Color_3);

            row.onmouseout=(function($row)
            {
                return function()
                {
                    $row.style.backgroundColor=temp;
                };
            })(row);
        }
    }
};